﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Guline.SupportCMS.Models.Object
{
    public class Category
    {
        [Key]
        public int ID { get; set; }

        public string Name { get; set; }

        public string Order { get; set; }

        public bool Enable { get; set; }

        [InverseProperty("Category")]
        public virtual ICollection<ArticleCategory> ArticleCategorys { get; set; }

        [InverseProperty("Category")]
        public virtual ICollection<VideoCategory> VideoCategorys { get; set; }

        public Nullable<int> ParentID { get; set; }
        [ForeignKey("ParentID")]
        public virtual Category Parent { get; set; }

        [InverseProperty("Parent")]
        public virtual ICollection<Category> Childrens { get; set; }
    }
}